<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <meta name="author" content="zouzhongbo" />
        <title>117 Countdown</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" charset="utf-8"></script>
        <script src="https://raw.github.com/dalpo/jquery-countdown/master/js/jquery.countdown.js" charset="utf-8"></script>
        <script type="text/javascript">
            function numToString(num, len) {
                var str = num.toString();
                var n = str.length;
                for (var i = 0; i < len - n; i++) {
                    str = "0" + str;
                }
                return str;
            }
            function getStartTime(){
                var to = new Date(2016, 7, 8, 8);
                var from = new Date();
                var diff = Math.floor((to - from) / 1000);
                var days = Math.floor(diff / (3600*24));
                diff = diff - (days * 3600 * 24);
                var hours = Math.floor(diff / 3600);
                diff = diff - (hours * 3600);
                var mins = Math.floor(diff / 60);
                diff = diff - mins * 60;
                return numToString(days, 4) + ":" + 
                    numToString(hours, 2) + ":" + 
                    numToString(mins, 2) + ":" + 
                    numToString(diff, 2);
            }
            $(function(){
                var startTime = getStartTime();
                $('#counter').countdown({
                    stepTime: 60,
                    format: 'dddd:hh:mm:ss',
                    startTime: startTime,
                    //digitImages: 6,
                    //--MEDIUM SIZE--
                    digitWidth: 28,
                    digitHeight: 40,
                    //--SMALLEST SIZE--
                    //digitWidth: 13,
                    //digitHeight: 18,
                    //--FULL SIZE--
                    //digitWidth: 53,
                    //digitHeight: 77,
                    image: 'http://117countdown.googlecode.com/hg/digits40.png'
                });
            });
        </script>
  </head>
<body>
    <div id="counter" style="font-size: 30px; zoom: 0.75;"></div>
</body>
</html>